# -*- coding: utf-8 -*-
"""
@Time ： 2022/12/29 21:54
@Author ： PJC
"""
import os
import configparser

# 获取当前路径下的配置文件
configpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)) + r"/config/token.ini")
conf = configparser.ConfigParser()

conf.read(configpath, encoding="UTF-8-sig")

# 读取配置文件中的内容
Environ = conf.get('Environ', 'environ')
env = conf.get('Environ', 'env')
# lisi_token = conf.get('token', 'lisi_token')
# maji_token = conf.get('token', 'maji_token')

sections = conf.sections()
items = conf.items('token')
conf.set('token', 'lisi_token', 'ppppp')


if __name__ == '__main__':
    # print("Environ：", Environ, "\nenv:", env, "\nlist_token:", lisi_token, "\nmaji_token:", maji_token)
    print(sections)
    print(items)


